import request from '@/utils/request'

// 查询分类列表数据
export const getCateListApi = (params) => request('/categories', 'get', params)
// 根据分类id查询分类详情
export const getCateInfoByIdApi = id => request(`/categories/${id}`, 'get')

// 添加分类
export const addCateApi = data => request('/categories', 'post', data)

// 修改分类
export const editCateApi = data => request(`/categories/${data.cat_id}`, 'put', data)

// 根据id删除分类
export const deleteRoleApi = id => request(`/categories/${id}`, 'delete')

